const express = require("express");
const router = express.Router();
const {
  getRepoListByTeamIDController,
  getAllRepoListController,
  addRepoInfoController,
  deteleRepoInfoByRIDController,
  searchRepoInfoByKeywordController,
  syncReposController,
} = require("../controller/repos");

//通过仓库Id，获取仓库信息
router.get("/reposList/:teamId", getRepoListByTeamIDController);

//获取所有仓库信息
router.post("/reposList", getAllRepoListController);

//新增/修改仓库信息
router.post("/repos/add", addRepoInfoController);

//删除仓库信息
router.delete("/repos/delete", deteleRepoInfoByRIDController);

//搜索仓库
router.post("/repos/search", searchRepoInfoByKeywordController);

//同步最新仓库
router.post("/repos/sync", syncReposController);

module.exports = router;
